<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>Document</title>
		<script src="https://unpkg.com/vue"></script>
	</head>

	<body>
		<hr>
		<div id="example">
			<input type="text" id="input" v-model.sync="inputVal">
			<!--<input type="text" id="input" value="111">-->
			<!--<button @click="setVal" v-if='false'>通过vm改变值(vm改变后)</button>-->
			<button id="btn" onclick="test()">设置value cc</button>
		</div>
		<div class="vin">
		</div>
		<script>
      window.Vue.config.devtools = true;
			var input = document.querySelector("#input");
			var oBtn = document.querySelector("#btn");
			var app = new Vue({
				el: "#example",
				data: {
					inputVal: "初始值1"
				}
				// methods: {
				// 	setVal: function() {
				// 		//app.$set("inputVal","vm改变后");
				// 		this.inputVal = "vm改变后";
				// 		// app.$log("inputVal");
				// 	}
				// }
			})
      function test() {
        console.log("invoke OBtn click");
				input.value = 222;

        // app.inputVal= 222;
				console.log(app.$data);
			}
		</script>
	</body>

</html>